1. Field of the Invention
The present invention relates to an information processing apparatus that converts document data from an application and transmits the converted data to a printer.
2. Description of the Related Art
When a user prints document data that has been created using an application or the like, printing data is transmitted to a printer through a process carried out by the application, a printer driver and an Operating System (OS) in cooperation. In a case where the OS of a Personal Computer (PC) in which the application operates is Windows (registered trademark), there are two types of a printing process:
Windows printing scenario of RAW spooling
Windows printing scenario of EMF spooling
FIG. 1 illustrates a general configuration of one example of a Windows printing scenario of RAW spooling. A PC 600 has an application 601, and, as functions of an OS (not shown), has a Graphical Device Interface (GDI) 602, a printer driver 610, a spooler 603, a printer processor 606 and a port monitor 605.
The printer driver 610 includes a User Interface (UI) part 612 and a graphics part 611. When a user inputs an instruction for printing a document to the application 601, the application 601 sends a DEVMODE structure (hereinafter, simply referred to as DEVMODE) to the UI part 612 of the printer driver 610. DEVMODE is a data structure in which member variables are defined for setting printing conditions in printer drivers of various types that operate on an OS in common. In response to receiving DEVMODE, the UI part 612 of the printer driver 610 displays a printing setting screen page (also may be called a “printing dialog”) on a display device.
The user sets printing conditions such as a paper sheet size, the required number of copies, duplex printing, and/or the like, by the displayed printing setting screen page, and inputs an instruction for printing. The UI part 612 receives the printing conditions that have been thus set by the user, and sends DEVMODE that includes the printing settings to the application 601.
The application 601 shown in FIG. 1 is, for example, an application of a document creation program (for example, MS-Word (registered trademark)). When having received DEVMODE from the UI part 612, the application 601 calls the GDI 602 with a GDI call, and sends DEVMODE and the document data to the GDI 602.
When having received DEVMODE and the document data from the application 601, the GDI 602 calls the graphics part 611 of the printer driver 610 by a DDI call, and sends DEVMODE and the document data to the graphics part 611.
The graphics part 611 reads DEVMODE obtained from the GDI 602 uses the document data for which the application 601 has given an instruction to print, creates printing data (RAW data) 800 that reflects the printing settings, and sends the created printing data 800 to the spooler 603. It is noted that the printing data 800 includes rendering data (for example, PDL data) and control data (for example, a PJL printing command).
The spooler 603 stores the printing data 800 obtained from the graphics part 601 as a spool file 604. The printer processor 606 processes the printing data 800 and sends the processed printing data 800 to the spooler 603. The spooler 603 sends the printing data 800 to the port monitor 605. The port monitor 605 monitors ports that the PC 600 has, and sends the printing data 800 to a port to which the printer 700 is connected. The printer 700 prints the printing data 800.
FIG. 2 illustrates one example of a general configuration of the above-mentioned “Windows printing scenario of EMF spooling”. According to the “Windows printing scenario using EMF spooling”, the processes from the printing instruction by the user through the calling of the GDI 602 by the application 601 are the same as those of FIG. 1.
Then, the GDI 602 generates EMF data 900 and sends the generated EMF data 900 to the spooler 603. When all of the document data of the application 601 has been stored in the spooler 603 as EMF data 900, the spooler 603 informs the printer processor 606 of starting despooling, and the printer processor 606 obtains the spool data (EMF data) 900. The printer processor 606 carries out an editing process on the obtained EMF data 900 such as collecting data for each page, reversing the order, preparing for bookbinding and/or the like, and then, carries out a GDI call and sends the thus processed EMF data 900 to the GDI 602.
The GDI 602 calls the graphics part 611 of the printer driver 610 by a DDI call, and sends DEVMODE and the EMF data 900 to the graphics part 611. The graphics part 611 creates printing data (RAW data) 800 using the EMF data 900 and DEVMODE, and sends the created printing data 800 to the spooler 603. When all of the printing data 800 has been thus sent from the graphics part 611, the spooler 603 sends the printing data 800 to the port monitor 605.
DEVMODE has a Public area and a Private area. The Public area is a common area that can be used without regard to particular printers or printer drivers, and common member variables are defined for respective printer drivers that operate on an OS. The Private area is a so-called extended area for defining member variables for each of the printer drivers. Accordingly, in the Private area, it is possible to define member variables to be used to manage printing conditions concerning functions unique to each of the printer drivers (printer).
Thus, in the Private area of DEVMODE, adding and/or updating of the member variables may occur. In order to manage such a Private area of DEVMODE, a technology has been proposed (for example, see a patent reference No. 1 (Japanese Laid-Open Patent Application No. 2009-230426)). The patent reference No. 1 discloses a printer driver in which only the size of a Private area is fixed, and member variables are not fixed. Then, the member variables and the positions thereof are fixed by an information arrangement file. Thereby, it is possible to eliminate the need of re-compiling each printer driver by preparing different information arrangement files for respective printer drivers.
The printer driver described in the patent reference No. 1 can flexibly configure the Private area. Generally speaking, a printer driver is the same even when an application that calls the printer driver differs as long as a printer is the same.
However, there is a case where it is preferable to carry out a specific process only in a case where a printer driver is called by a specific application. For example, the graphics part 611 creates the control data from DEVMODE. Further, the graphics part 611 also creates the control data from information of document data that the application 601 has or from information not included in DEVMODE. However, there is a case where the specific application does not have information of document data that a general application has. In such a case, the printer driver may create the control data that is erroneous.
If the printer driver can detect that it has been called by the specific application, it is possible to use the control data created by the graphics part 611 called by the general application, or not to create the control data. However, generally speaking, the printer driver has no such a system of detecting that it has been called by the specific application.